<?php 
include  "../protected.php"; /*Valida el inico de sesion*/
?>
<!doctype html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Actualizar usuarios</title>
  <link rel="stylesheet" type="text/css" href="mtb.css"/>
  <link rel="stylesheet" type="text/css" href="main.css"/>
  <link rel="stylesheet" type="text/css" href="ceGrid.css"/>
  <!-- // <script type="text/javascript" src="../../../js/jquery.js"></script> -->
</head>

<?php
require '../../conexionBD/cecndb.php';
$id=$_GET['id'];
$SQLstr = "SELECT GS04COBO,GS04FEBO,GS01COAC,GS02COTP,GS03COPR,GS04CACP,GS04ESBO FROM gs04regbol WHERE GS04COBO = '".$id."'";
$EjecutaCSQL = $conectarBD->query($SQLstr);
// echo $SQLstr;
while ($registros = $EjecutaCSQL->fetch_row())
    {    
    	$vCOBO=$registros[0];
        $vFEBO=$registros[1];
        $vCOAC=$registros[2];
        $vCOTP=$registros[3];
    	$vCOPR=$registros[4];
        $vCACP=$registros[5];
        $vESBO=$registros[6];
    }
 $conectarBD->close();
?>

<a class="btn" href='index.php'>Lista boletas</a>
<body>
<div id="content-mt">
<div id="div01"  class="curved" >

<form name="Registroact" method="post" action="update.php" class="style" >         
<table id = "tab01">
     <tr>
	     <td>Codigo boleta</td>
         <td><label>
             <input type="text" name="Txt_GS04COBO" id="Txt_GS04COBO" readonly value="<?php echo $vCOBO ?>"   maxlength="20" /> 
         </label></td>
    </tr>
    <tr>
         <td>Fecha de registro</td>
         <td><label>
             <input type="date" name="Txt_GS04FEBO" id="Txt_GS04FEBO" value="<?php echo $vFEBO ?>"   maxlength="20" /> 
         </label></td>
    </tr>
	<tr> <td>Académico</td>
         <td><select name="Txt_GS01COAC" id="Txt_GS01COAC">
                    
                    <option value="<?php echo "$vCOAC" ?>"><?php echo "$vCOAC"?></option>
                    <?php
                    require '../../conexionBD/cecndb.php';
                    $sql=$conectarBD->query("SELECT * FROM gs01regaca ORDER BY GS01NOAC");
                    ?>
                    <?php while ($row =$sql->fetch_assoc()){ ?>
                    <option value="<?php echo $row['GS01COAC']; ?>"><?php echo $row['GS01NOAC']; ?></option>
                    <?php }
                      mysqli_free_result($sql);
                     ?>
                </select>
    </tr>
	<tr>
	     <td>Curso</td>
         <td><select name="Txt_GS02COTP" id="Txt_GS02COTP">
                    <option value="<?php echo $vCOTP ?>"><?php echo "$vCOTP"?></option>
                    <?php
                    $sql=$conectarBD->query("SELECT * FROM gs03catpro ORDER BY GS03NOPR");
                    ?>
                    <?php while ($row =$sql->fetch_assoc()){ ?>
                    <option value="<?php echo $row['GS03COPR']; ?>"><?php echo $row['GS03NOPR']; ?></option>
                    <?php }
                      mysqli_free_result($sql);

                     ?>
                </select></td>
     </tr>
     <tr>
         <td>Tipo Curso</td>
         <td><select name="Txt_GS03COPR" id="Txt_GS03COPR">
                    <option value="<?php echo $vCOPR ?>"><?php echo "$vCOPR"?></option>
                    <?php
                    $sql=$conectarBD->query("SELECT * FROM gs02cattip ORDER BY GS02DETPO");
                    ?>
                    <?php while ($row =$sql->fetch_assoc()){ ?>
                    <option value="<?php echo $row['GS02COTP']; ?>"><?php echo $row['GS02DETPO']; ?></option>
                    <?php }
                      mysqli_free_result($sql);
                      $conectarBD->close();
                     ?>
                </select></td>
     </tr>
     <tr>
         <td>Copias</td>
         <td><label>
         <input type="text" name="Txt_GS04CACP" id="Txt_GS04CACP" value="<?php echo $vCACP?>"  maxlength="50" required='required' /> 
         </label></td>
     </tr>
     <tr>
         <td>Estado</td>
         <td><select name="Txt_GS04ESBO" id="Txt_GS04ESBO">
                    <option>Aprobada</option>
                    <option>Rechazada</option>
                </select></td>
     </tr>
	  <tr>
         <td></td>
         <td><label>
         <input type="submit" name="Agregar_Btn"  class="btn-m"  id="Agregar_Btn" value="Cambiar" />
         </label></td>
     </tr>
		

   </table> 
</form>
</div>
</div>
</body>
</html>